package com.itheima.service.imp;

import com.itheima.common.PageBean;
import com.itheima.dto.Page;
import com.itheima.mapper.OperateLogMapper;
import com.itheima.service.OperateLogService;
import com.itheima.vo.OperateLogVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OperateLogServiceImpl implements OperateLogService {
    @Autowired
    private OperateLogMapper operateLogMapper;
    @Override
    public PageBean<OperateLogVo> pageQuery(Page page) {
        PageBean<OperateLogVo> pageBean = new PageBean<>();

        pageBean.setRows(operateLogMapper.pageQuery(page));
        pageBean.setTotal(operateLogMapper.count());
        return pageBean;
    }
}
